import axios from '@/plugins/axios'

// 查询可编辑的职位类别树形结构
export async function selectAll (params) {
  try {
    let res = await axios.post(`/jobboard/settings/positionCategory/selectAll`, params)
    return res.data
  } catch (err) {
    console.log(err)
    return err.response.data
  }
}
// 查询可编辑的职位类别树形结构
export async function editList (params) {
  try {
    let res = await axios.post(`/jobboard/settings/positionCategory/editList`, params)
    return res.data
  } catch (err) {
    console.log(err)
    return err.response.data
  }
}
// 新增职位类别
export async function saveList (params) {
  try {
    let res = await axios.post(`/jobboard/settings/positionCategory/save`, params)
    return res.data
  } catch (err) {
    console.log(err)
    return err.response.data
  }
}
// 编辑职位类别
export async function updateList (params) {
  try {
    let res = await axios.post(`/jobboard/settings/positionCategory/update`, params)
    return res.data
  } catch (err) {
    console.log(err)
    return err.response.data
  }
}
// 启用/禁用职位类别
export async function updateStatus (params) {
  try {
    let res = await axios.post(`/jobboard/settings/positionCategory/updateStatus`, params)
    return res.data
  } catch (err) {
    console.log(err)
    return err.response.data
  }
}
// 删除职位类别
export async function deleteData (params) {
  try {
    let res = await axios.post(`/jobboard/settings/positionCategory/delete`, params)
    return res.data
  } catch (err) {
    console.log(err)
    return err.response.data
  }
}
